package com.xxx.yuedong.community.service.impl;

import com.xxx.yuedong.community.db.dao.RemindDao;
import com.xxx.yuedong.community.pojo.Remind;
import com.xxx.yuedong.community.service.RemindService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

/**
 * @author HG
 * @version 1.0
 **/
@Service
@Slf4j
public class RemindServiceImpl implements RemindService {
    @Autowired
    private RemindDao remindDao;

    @Override
    public int insert(Remind remind) {
        log.debug("系统正在生成消息...");
        int rows = remindDao.insert(remind);
        return rows;
    }

    @Override
    public List<HashMap> searchRemindById(Long userId) {
        List<HashMap> msgList = remindDao.searchRemindById(userId);
        return msgList;
    }
}
